<%--
  Created by IntelliJ IDEA.
  User: brss
  Date: 2018/5/14
  Time: 17:10
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>附属医院首页</title>
    <link rel="stylesheet" href="/css/main.css">
    <link rel="stylesheet" href="/layui/layui2/css/layui.css" media="all">
    <style>

    </style>
</head>
<body>

<div class="wrapper">
    <div class="nav">
        <ul class="layui-nav" lay-filter="">
            <li class="layui-nav-item"><a href="/index">医院首页</a></li>
            <li class="layui-nav-item"><a href="#">科室详情</a></li>
            <li class="layui-nav-item"><a href="#">医院动态</a></li>
            <li class="layui-nav-item"><a href="#">联系我们</a></li>
            <li class="layui-nav-item"><a href="#">帮助</a></li>
            <li class="layui-nav-item layui-this" style="float: right;"><a href="/showLogin">注册/登录</a></li>
        </ul>
    </div>
    <div class="main">
        <div class="formDiv">
            <h1 style="text-align: center">登录页面</h1>
            <form class="layui-form" action="" lay-filter="example">
                <div class="layui-form-item">
                    <label class="layui-form-label">用户名</label>
                    <div class="layui-input-block">
                        <input type="text" name="username" lay-verify="title" autocomplete="off" placeholder="患者请输入用户名，医生请输入医生通行码" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">密码</label>
                    <div class="layui-input-block">
                        <input type="password" name="password" placeholder="请输入密码" autocomplete="off" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">请选择</label>
                    <div class="layui-input-block">
                        <select name="interest" lay-filter="aihao">
                            <option value=""></option>
                            <option value="0">我是医生</option>
                            <option value="1">我是病人</option>
                        </select>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button class="layui-btn" lay-submit="" lay-filter="demo1">立即提交</button>
                    </div>
                </div>
            </form>
            <div>
                <button id="registe" class="layui-btn layui-btn-normal" style="float: right;margin-right: 30px">没有账户？立即注册</button>
            </div>
        </div>
    </div>
    <div style="height: 105px;"></div><!-- 用来撑起底部 -->
    <footer>
        <div class="copy">
            &copy 医科大学附属医院 - 2018
        </div>
    </footer>
</div>

<script src="/layui/layui2/layui.js"></script>
<script src="/js/jquery.min.js"></script>
<script>
    layui.use(['form', 'layedit', 'laydate'], function(){
        var form = layui.form
            ,layer = layui.layer
            ,layedit = layui.layedit
            ,laydate = layui.laydate;


        //监听提交
        form.on('submit(demo1)', function(data){
            layer.alert(JSON.stringify(data.field), {
                title: '最终的提交信息'
            })
            return false;
        });
        $("#registe").click(function (e) {
            $(window).attr('location','/registe');
        });
    });
</script>
</body>
</html>

